<template>
  <el-select v-model="selectAuditStatus" :placeholder="placeholder" clearable class="!w-240px">
    <el-option
      v-for="dict in getIntDictOptions(DICT_TYPE.AUDIT_STATUS)"
      :key="dict.value"
      :label="dict.label"
      :value="dict.value"
    />
  </el-select>
</template>
<script lang="ts" setup>
import { propTypes } from '@/utils/propTypes'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'

/** 审核状态选择组件 */
defineOptions({ name: 'AuditPicker' })

const props = defineProps({
  modelValue: propTypes.number.def(undefined),
  placeholder: propTypes.string.def('请选择审核状态')
})

const emit = defineEmits(['update:modelValue'])

const selectAuditStatus = computed({
  get: () => {
    return props.modelValue
  },
  set: (val: number) => {
    emit('update:modelValue', val)
  }
})
</script>
